﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Log4Net
{
    public class LogHelper
    {
        public static readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("loginfo");
        public static readonly log4net.ILog logerror = log4net.LogManager.GetLogger("logerror");
        public static readonly log4net.ILog logs = log4net.LogManager.GetLogger("logs");
        
        public static void WriteLog(string info)
        {
            if (loginfo.IsInfoEnabled) {
                loginfo.Info(info);
            }
        }

        public static void WriteLog(string info, Exception se)
        {
            if (logerror.IsErrorEnabled) {
                logerror.Error(info, se);
            }
        }

        public static void write(string info)
        {
            if (logs.IsInfoEnabled)
            {
                logs.Info(info);
            }
        }
    }
}
